1. Field
Apparatuses and methods consistent with exemplary embodiments relate to a moving picture encoding/decoding apparatus and method for processing of a moving picture, which is divided in units of slices.
2. Description of the Related Art
In general, the amount of computation performed for motion estimation greatly affects the total amount of computation required for coding. For example, when motion estimation is performed with one or more forward/backward reference frames, as in the H.264/AVC compression encoding scheme, the complexity thereof is very high. Especially, in the case of an MPEG-4 AVC/H.264 compression video structure, when motion estimation with respect to a hierarchical B-picture is performed using various blocks in order to achieve temporal scalability, the complexity thereof increases exponentially.
Meanwhile, recently, with the development of multi-core technology, a greater number of moving picture encoding/decoding apparatuses based on parallel processing have been developed. According to a parallel processing method using H.264/AVC, which is a recent moving picture compression standard, an image is divided into regions, each of which is called a “slice,” and each slice image region is individually encoded or decoded in each process or thread. Since the parallel processing method does not require information to be shared and transferred between image regions of slices, into which an image is divided, the parallel processing method has advantages in that the implementation thereof is easy and the efficiency of parallel processing is excellent.
FIG. 1 is a block diagram schematically illustrating the configuration of a conventional moving picture encoding apparatus for processing a moving picture divided in units of slices.
The moving picture encoding apparatus includes a memory 10, a multi-core processor 20, an MPEG data division module 30, and a decoding/merging module 40.
According to the conventional moving picture encoding apparatus, one-frame data of a bitstream encoded by an MPEG algorithm is stored in the memory 10, is allocated as threads to cores within the multi-core processor 20, is decoded, and is then merged.
The multi-core processor 20 includes a plurality of cores, i.e. central processing units (CPUs), which operate thread by thread, wherein each core operates independently. The memory 10 includes a plurality of buffers which store individual slices (e.g. slice 1, slice 2, . . . , slice N) received from the MPEG data division module 30, and provide the stored slices to cores (core 1, core 2, . . . , core N) of the multi-core processor 20.
The MPEG data division module 30, when receiving MPEG data, extracts decoding information, divides the received MPEG data into slices, and distributes decoding processes for bitstreams based on the divided individual slice units to the cores in the multi-core processor as threads. To this end, the MPEG data division module 30 includes a header parser 32, a slice divider 34, a core computing load measurer 36, and a distributor 38.
The header parser 32 receives MPEG data in the form of a bitstream, and performs a basic header parsing operation, such as extraction of decoding information. In addition, the header parser 32 divides and allocates the region of the memory 10 so as to prepare the buffers for the slices. That is, the header parser 32 divides the region of the memory 10 into a plurality of buffers so as to correspond to the cores of the multi-core processor 20, and allocates the buffers to the cores.
The slice divider 34 detects a slice start code within a bitstream and divides the bitstream in units of slices. The distributor 38 properly distributes bitstreams divided in units of slices to the buffers. The core computing load measurer 36 measures a computing occupancy of each core.
Meanwhile, referring to FIG. 1, many moving picture codecs use a parallel processing scheme of dividing an image into slices and allocating the slices to cores, respectively, in order to support parallel processing in a multi-core environment. However, such a scheme degrades the encoding performance as a whole, as compared with a scheme of encoding the entire image.
Therefore, there is a necessity for a parallel processing-based moving picture encoding/decoding apparatus which can enhance the efficiency in encoding or decoding of a moving picture through an efficient slice division.